package cn.bone.sentinel.bean;

import java.io.Serializable;

/**
 * Created by superbone on 2017/3/29.
 * 接口调用统一返回对象
 */
public class CommonResult<T> implements Serializable {
    /**
     * 0:   成功
     * 1:   token无效
     * 2:   参数校验错误
     * 3:   业务逻辑错误
     * 4:   请求超时(预留,可用于异步限时请求或者熔断处理等.初期暂不实现)
     * 5:   服务器异常
     * 6:   没有权限
     * 7:   用户异地登录
     * 8:   用户被禁用
     */
    private Integer code;
    private String sucMsg;
    private String errMsg;
    private T data;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getSucMsg() {
        return sucMsg;
    }

    public void setSucMsg(String sucMsg) {
        this.sucMsg = sucMsg;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
